import request from '@/utils/request'

const api = {
    goodsKindsList: '/goodsKinds/lists',
    goodsKindsAdd: '/goodsKinds/add',
    goodsKindsEdit: '/goodsKinds/edit',
    goodsKindsDel: '/goodsKinds/delete',
    goodsList: '/goods/lists',
    goodsKinds: '/notControl/goodsKindsList',
    goodsAdd: '/goods/add',
    goodsEdit: '/goods/edit',
    goodsPutaway: '/goods/putaway',
    goodsDownfall: '/goods/downfall',
    goodsDel: '/goods/delete',
    goodsOrderList: '/goodsOrder/lists',
    goodsOrderDetail: '/goodsOrder/detail',
    goodsOrderSend: '/goodsOrder/sendOut',
    goodsOrderSendEdit: '/goodsOrder/sendOutEdit',
    goodsOrderPush: '/goodsOrder/orderPush',
    goodsOrderTake: '/goodsOrder/takeOrder'
}

export function goodsOrderTake (parameter) {
    return request({
        url: api.goodsOrderTake,
        method: 'get',
        params: parameter
    })
}

export function goodsOrderPush (parameter) {
    return request({
        url: api.goodsOrderPush,
        method: 'post',
        data: parameter
    })
}

export function goodsOrderSendEdit (parameter) {
    return request({
        url: api.goodsOrderSendEdit,
        method: 'get',
        params: parameter
    })
}

export function goodsOrderSend (parameter) {
    return request({
        url: api.goodsOrderSend,
        method: 'get',
        params: parameter
    })
}

export function goodsOrderDetail (parameter) {
    return request({
        url: api.goodsOrderDetail,
        method: 'get',
        params: parameter
    })
}

export function goodsOrderList (parameter) {
    return request({
        url: api.goodsOrderList,
        method: 'get',
        params: parameter
    })
}

export function goodsKinds (parameter) {
    return request({
        url: api.goodsKinds,
        method: 'get',
        params: parameter
    })
}

export function goodsDel (parameter) {
    return request({
        url: api.goodsDelete,
        method: 'get',
        params: parameter
    })
}

export function goodsPutaway (parameter) {
    return request({
        url: api.goodsPutaway,
        method: 'post',
        data: parameter
    })
}

export function goodsDownfall (parameter) {
    return request({
        url: api.goodsDownfall,
        method: 'post',
        data: parameter
    })
}

export function goodsEdit (parameter) {
    return request({
        url: api.goodsEdit,
        method: 'post',
        data: parameter
    })
}

export function goodsAdd (parameter) {
    return request({
        url: api.goodsAdd,
        method: 'post',
        data: parameter
    })
}

export function goodsList (parameter) {
    return request({
        url: api.goodsList,
        method: 'get',
        params: parameter
    })
}

export function goodsKindsDel (parameter) {
    return request({
      url: api.goodsKindsDel,
      method: 'post',
      data: parameter
    })
}

export function goodsKindsEdit (parameter) {
    return request({
      url: api.goodsKindsEdit,
      method: 'post',
      data: parameter
    })
}

export function goodsKindsAdd (parameter) {
    return request({
      url: api.goodsKindsAdd,
      method: 'post',
      data: parameter
    })
}

export function goodsKindsList (parameter) {
    return request({
        url: api.goodsKindsList,
        method: 'get',
        params: parameter
    })
}
